import server from './myAxios/interceptors';
//商品列表数据
export const getGoods=(data)=>{
    return server.request({
        url:'goods',
        method:'get',
        params:{...data}
    })
}
//删除商品
export const deleteGoods=(id)=>{
    return server.request({
        url:`goods/${id}`,
        method:'delete',
    })
}
//添加商品
export const postAddGoods=(data)=>{
    return server.request({
        url:`goods`,
        method:'post',
        data
    })
}
//根据 ID 查询商品
export const getGoodsId=(data)=>{
    return server.request({
        url:`goods`,
        method:'get',
        params:{...data}
    })
}


